<link rel="stylesheet" href="/css/other.css" type="text/css" />

<% @category = Cip::Category.find_by(slug: 'services') %>
<%= render "cip/pages/banner" %>
<div class="grid ovf clear">
  <div class="main-box fl">
    <div class="fl main"><h1 class="ph"><%= @category.title %><small><%= @category.metadata && @category.metadata['副标题'] %></small></h1></div>
    <span class="fr c49 f14"> <a href="/">首页</a> > <%= @category.title %></span>
  </div>

  <% @categories = @category.children.includes(:pages) %>

  <ul class="main-con clear fl">
    <% @categories.each_with_index do |category, index| %>
      <li> <div class="ic-bg fl"><img src="/images/icon<%= index + 1 %>.png"></div> <div class="fl fr-con">  <p class="b fyh f14  c32"><%= category.title %></p><p class="lh18"><%= category.metadata && truncate(category.metadata['分类简介'], length: 80) %></p>  <p class="lh18"><% category.pages.each do |page| %><a href="<%= page.url %>" class="a2">&nbsp;&nbsp;<font color="#ff6c00">·</font>&nbsp;&nbsp;<%= page.title %></a><% end %></p> </div> </li>
    <% end %>
  </ul>
</div>
